package com.suyang.syt.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.suyang.syt.dao.interfaces.WeixinQRcodeDao;
import com.suyang.syt.service.interfaces.QrcodeService;

@Service
public class QrcodeServiceImpl implements QrcodeService {
	@Autowired
	private WeixinQRcodeDao weixinQRcodeDao;

	@Override
	public void deleteQrcode() throws Exception {
		String hql = " delete from WeixinQRcode where type=0 and timestamp+expire_seconds*1000 < ?";
		weixinQRcodeDao.executeByHql(hql, System.currentTimeMillis());
	}

}
